﻿<UserControl x:Class="Anagramme.Templates.WinsTemplate"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DataContext="{d:DesignData Source=/SampleData/ResultInfoSampleData.xaml}"
             d:DesignHeight="480" d:DesignWidth="640">
    <Grid VerticalAlignment="Center" >
    	<Grid.RowDefinitions>
    		<RowDefinition Height="Auto"/>
    		<RowDefinition Height="Auto"/>
    	</Grid.RowDefinitions>
    	<TextBlock Text="{Binding Path=Result.WINS, Source={StaticResource ResourceKey=Resources}}" 
		           HorizontalAlignment="Center" VerticalAlignment="Center" Margin="12,12,12,12" Style="{DynamicResource ResourceKey=WinsText}" />
    	<Grid Grid.Row="1">
    		<Grid.ColumnDefinitions>
    			<ColumnDefinition Width="*"/>
    			<ColumnDefinition Width="Auto"/>
    			<ColumnDefinition Width="Auto" />
    			<ColumnDefinition Width="Auto" />
    			<ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding Path=Player1.Name, Mode=OneWay}" HorizontalAlignment="Right" VerticalAlignment="Center" Style="{DynamicResource ResourceKey=Player1Text}" />
            <TextBlock Grid.Column="1" Text="{Binding Path=Player1.Score, Mode=OneWay}" VerticalAlignment="Center" Margin="12,0" Style="{DynamicResource ResourceKey=Player1Text}" />
            <TextBlock Grid.Column="2" Text="{Binding Path=Result.SEPARATOR, Source={StaticResource ResourceKey=Resources}}" VerticalAlignment="Center" Style="{DynamicResource ResourceKey=SousTitre}" />
            <TextBlock Grid.Column="3" Text="{Binding Path=Player2.Score, Mode=OneWay}" VerticalAlignment="Center" Margin="12,0" Style="{DynamicResource ResourceKey=Player2Text}" />
            <TextBlock Grid.Column="4" Text="{Binding Path=Player2.Name, Mode=OneWay}" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{DynamicResource ResourceKey=Player2Text}" />
        </Grid>
    </Grid>
</UserControl>
